package manager.order;

import common.db.*;
import common.main.*;

public class OrderUpdateBean extends MainBean
{
	public void funcExecute() throws Exception
	{
		String code = (String)inputTable.get("code");
		String gcode = (String)inputTable.get("gcode");
		String sh_id = (String)inputTable.get("sh_id");
		String p_value = (String)inputTable.get("p_value");
		String o_state = (String)inputTable.get("o_state");

		String d_method = (String)inputTable.get("d_method");
		String c_yn = (String)inputTable.get("c_yn");
		String s_point = (String)inputTable.get("s_point");
		String receiver = (String)inputTable.get("receiver");
		String r_p1 = (String)inputTable.get("r_p1");
		String r_p2 = (String)inputTable.get("r_p2");
		String r_p3 = (String)inputTable.get("r_p3");
		String zip1 = (String)inputTable.get("zip1");
		String zip2 = (String)inputTable.get("zip2");
		String addr1 = (String)inputTable.get("addr1");
		String addr2 = (String)inputTable.get("addr2");
		String require = (String)inputTable.get("require");
		String u_point = (String)inputTable.get("u_point");
		String b_code = (String)inputTable.get("b_code");
		String p_way = (String)inputTable.get("p_way");
		
		String id = (String)inputTable.get("id");
		String client = (String)inputTable.get("client");		
		
		queryBuffer = new StringBuffer("");
		queryBuffer.append("UPDATE ORDERLIST SET ");
		queryBuffer.append("GOODS_CODE='"+gcode+"', SHOPPER_ID='"+sh_id+"', PURCHARSE_VALUE='"+p_value+"', ORDER_STATE='"+o_state+"', DELIVERY_METHOD='"+d_method+"', ");
		queryBuffer.append("REG_ID='"+id+"', REG_DATE=SYSDATE, REG_IP='"+client+"', UPD_ID='"+id+"', UPD_DATE=SYSDATE, UPD_IP='"+client+"', COMPLETION_YN='"+c_yn+"', SAVING_POINT='"+s_point+"', ");
		queryBuffer.append("RECEIVER='"+receiver+"', RECEIVER_PHONE1='"+r_p1+"', RECEIVER_PHONE2='"+r_p2+"', RECEIVER_PHONE3='"+r_p3+"', ZIPCODE1='"+zip1+"', ZIPCODE2='"+zip2+"', ");
		queryBuffer.append("ADDR1='"+addr1+"', ADDR2='"+addr2+"', REQUIRE='"+require+"', USE_POINT='"+u_point+"', BANK_CODE='"+b_code+"', PURCHARSE_WAY='"+p_way+"' ");
		queryBuffer.append("WHERE CODE='"+code+"'");

		DBExecute dbe = new DBExecute(queryBuffer.toString());
		outputList = dbe.getDataList();	
	}
}
